package com.wxy.gxs.springbootprojectday20.service.serviceImpl;

import com.wxy.gxs.springbootprojectday20.bean.User;
import com.wxy.gxs.springbootprojectday20.dao.UserRepository;
import com.wxy.gxs.springbootprojectday20.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserRepository userRepository;

    @Override
    public User findUserByUsernameAndPassword(String username, String password) {

        User user = userRepository.findByUsernameAndPassword(username, password);

        return user;
    }
}
